<template>
  <div ref="chart" style="width: 600px; height: 400px"></div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import * as echarts from 'echarts'
import { useCategoryLines } from './useCategoryLines'

const chart = ref<HTMLElement | null>(null)
const { options } = useCategoryLines()

onMounted(() => {
  if (chart.value) {
    const myChart = echarts.init(chart.value)
    myChart.setOption(options.value)
  }
})
</script>
